/*************************************************************************
	> File Name: P1170.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-02-10 16:33:02
 ************************************************************************/
#include <iostream>
using namespace std;

int gcd(int a, int b) {
    return (b ? gcd(b, a % b) : a);
}

int main() {
    int n;
    cin >> n;
    while (n--) {
        int x1, y1, x2, y2;
        scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
        int res = gcd(abs(x1 - x2), abs(y1 - y2));
        printf("%s\n", res == 1 ? "no" : "yes");
    }
    return 0;
}
